﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using UCS.ArtificialInteligence.AI;
using UCS.ArtificialInteligence.CitiesProblem.Model;

namespace UCS.ArtificialInteligence.CitiesProblem.Model
{
    public class CitiesProblem : IProblem
    {
        #region Private Members

        private City _from;
        private City _to;

        #endregion

        #region Constructors

        public CitiesProblem(City from, City to)
        {
            _from = from;
            _to = to;
        }

        #endregion

        #region Attributes and Properties

        public IProblemState InitialState
        {
            get { return _from; }
        }

        #endregion

        #region Public Methods

        public bool IsFinalState(ProblemState state)
        {
            return state.Units.Contains(_to);
        }

        #endregion
    }
}
